package com.biz.primus.app.erpbridge.feign;

import com.biz.primus.model.stock.vo.AllStockItemVo;
import com.biz.primus.model.stock.vo.IncrDepotStockReqVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * StockFeignClient
 *
 * @author JKLiues
 * @date 2017年11月17日
 */
@FeignClient(qualifier = "stockFeignClient", name = "service-stock")
public interface StockFeignClient {


    /**
     * 全量库存同步
     *
     * @param reqVos 请求vo
     */
    @PostMapping(value = "soa/stockService/saveStockAll")
    void saveDepotStocks(@RequestBody List<AllStockItemVo> reqVos);

    /**
     * 增量库存
     *
     * @param reqVo 请求vo
     */
    @PostMapping(value = "soa/stockService/updateStockOnly")
    void updateStockOnly(@RequestBody IncrDepotStockReqVo reqVo);

    /**
     * 全量库存后置操作
     *
     * @param channelCode 全量库存修改过得渠道码
     */
    @PostMapping("soa/stockService/afterHandleStockAll")
    void afterHandleStockAll(String channelCode);
}